-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ganu] Week 5 #845
base: main
Are you sure you want to change the base?
[ganu] Week 5 #845
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gwbaik9717 님, 5주차도 고생하셨습니다.
아직 Solving 중이셔서 우선 코멘트만 남깁니다!
워낙 잘 작성해주셔서 코멘트 남기기가 민망하네요..ㅎㅎ
앞으로도 좋은 코드 많이 공유 부탁드려요~
); | ||
|
||
for (const chr of str) { | ||
const index = chr.charCodeAt() - "a".charCodeAt(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
중요하지 않은 사항입니다.
"a".charCodeAt()
를 변수로 먼저 빼두는것도 좋지 않을까 싶네요!
Trie.prototype.search = function (word) { | ||
let current = this.head; | ||
|
||
for (const chr of word) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이것도 중요한 사항은 아닙니다!
search와 startsWith가 완전히 동일한 로직을 공유하는것 같아서, 다른 메서드로 묶어주는것도 좋을것 같네요!
답안 제출 문제
체크 리스트
In Review
로 설정해주세요.